#include "qDebugWrapper.h"

#include <string>
#include <sstream>
#include <QDebug>

void qPrint(const char* msg)
{
    std::stringstream ss;

    ss << "Qt OpenAL Soft: " << msg;
    qDebug() << ss.str().c_str();
}

void qPrintEx(const char* file, unsigned short line, const char* msg)
{
    std::string fullFilename(file);

    int ind = fullFilename.find_last_of("/") + 1;
    std::string filename = fullFilename.substr(ind);

    std::stringstream ss;

    ss << "Qt OpenAL Soft: " << filename.c_str() << ": " << line << ": " << msg;
    qDebug() << ss.str().c_str();
}
